package hello.controller;


import hello.entity.Student;
import hello.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cyp
 * @since 2018-08-03
 */
@Controller
@RequestMapping("/student")
public class StudentController {
    @Autowired
    StudentService studentService;

    @ResponseBody
    @RequestMapping("/hello")
    public Object hello(){
        Student student = studentService.selectById(1L);
        System.out.println(student);
        return student;
    }
}

